package com.foreknow.service.impl;

import com.foreknow.dao.FmeditemMapper;
import com.foreknow.entity.Fmeditem;
import com.foreknow.service.FmeditemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FmeditemServiceImpl implements FmeditemService {
    @Autowired
    private FmeditemMapper fmeditemMapper;

    @Override
    public int deleteById(Integer id) {
        return fmeditemMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Fmeditem record) {
        return fmeditemMapper.insertSelective(record);
    }

    @Override
    public Fmeditem queryOne(Integer id) {
        return fmeditemMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<Fmeditem> queryAll(Fmeditem fmeditem) {
        return fmeditemMapper.selectAll(fmeditem);
    }

    @Override
    public int update(Fmeditem record) {
        return fmeditemMapper.updateByPrimaryKeySelective(record);
    }
}